<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>管理员主界面</title>
    <link rel="stylesheet" href="assets/outerRes/css/bootstrap.css">
    <link rel="stylesheet" href="assets/innerRes/css/header.css">
    <link rel="stylesheet" href="assets/innerRes/css/index.css">
</head>
<body>
<jsp:include page="/WEB-INF/commonJsp/header.jsp"/>
<div class="pageContainer">
    <aside class="foodNavContainer">
        <nav class="foodNav">
            <%--<a href="#">新鲜水果</a>--%>
            <%--<a href="#">劲爆零食</a>--%>
            <%--<a href="#">健康蔬菜</a>--%>
            <%--<a href="#">特色美食</a>--%>
            <%--<a href="#">经典补品</a>--%>
            <%--<a href="#">美食搭配</a>--%>
            <%--<a href="#">吃遍全球</a>--%>
            <%--<a href="#">自给自足</a>--%>
            <c:forEach items="${commodityTypeList}" var="oneType">
                <c:choose>
                    <c:when test="${targetCommodityTypeId == oneType.id}">
                        <a href="#" commodityTypeId="${oneType.id}" class="leftNavSelected">${oneType.typeName}</a>
                    </c:when>
                    <c:otherwise>
                        <a href="#" commodityTypeId="${oneType.id}">${oneType.typeName}</a>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </nav>
    </aside>
    <div class="allRightContainer">
        <aside class="onShelfContainer">
            <input id="searchCommodity" type="text" class="search" title="search" placeholder="请输入搜索关键字"/>
            <nav class="onShelf">
                <c:forEach items="${commodityStatusList}" var="oneStatus">
                    <c:choose>
                        <c:when test="${targetCommodityStatusId == oneStatus.id}">
                            <a href="#" commodityStatusId="${oneStatus.id}"
                               class="topNavSelected">${oneStatus.statusName}</a>
                        </c:when>
                        <c:otherwise>
                            <a href="#" commodityStatusId="${oneStatus.id}">${oneStatus.statusName}</a>
                        </c:otherwise>
                    </c:choose>
                </c:forEach>
                <%--<a href="#">已上架商品</a>--%>
                <%--<a href="#">未上架商品</a>--%>
                <%--<a href="#">已删除商品</a>--%>
                <a href="skipView/addCommodity.do"><span class="glyphicon glyphicon-plus-sign"></span></a>
            </nav>
        </aside>

        <aside class="provinceScreenContainer">
            <div class="provinceScreenTitle">
                <div>省份筛选</div>
                <a href="#">清空</a>
            </div>
            <div class="provinceScreenList">
                <div>
                    <c:forEach items="${provinceList}" varStatus="s" var="province">
                        <c:if test="${s.index % 6 == 0}">
                            <div class="customRow">
                        </c:if>
                        <div class="optionPack">
                            <input type="checkbox">${province.provinceName}
                        </div>
                        <c:if test="${(s.index + 1) % 6 == 0}">
                            </div>
                        </c:if>
                    </c:forEach>
                </div>
            </div>
        </aside>

        <aside class="commodityListContainer">
            <div class="commodityListTitle">
                <div>商品列表</div>
            </div>
            <div class="commodityList">
                <div>
                    <c:forEach items="${allResultTypeCommodity}" varStatus="s" var="commodity">
                        <c:if test="${s.index % 3 == 0}">
                            <div class="customRow">
                        </c:if>
                        <div class="commodityInfo">
                            <div class="cityLabel">${commodity.provinceInfo.provinceName}</div>
                            <div class="commodityStatus">${commodity.commodityStatus.statusName}</div>
                            <img src="imagePhoto/firstImage.do?commodityId=${commodity.id}"/>
                            <div class="commodityName">${commodity.baseInfoDescription}</div>
                            <div class="commodityPrice">${commodity.price}${commodity.unit}</div>
                            <div class="commentAmount">已有${commodity.commentAmount}人评价</div>
                        </div>
                        <c:if test="${(s.index + 1) % 3 == 0}">
                            </div>
                        </c:if>
                    </c:forEach>

                    <!-- <div class="customRow">
                        <div class="commodityInfo">
                            <div class="cityLabel">北京</div>
                            <div class="pull-right">已上架</div>
                            <img src="assets/innerRes/img/test1.jpg"/>
                            <div class="commodityName">水果拼盘</div>
                            <div class="commodityPrice">10元/个</div>
                            <div class="commentAmount">已有10人评价</div>
                        </div>
                        <div class="commodityInfo">
                            <div class="cityLabel">北京</div>
                            <img src="assets/innerRes/img/test2.jpg"/>
                            <div class="commodityName">水果拼盘</div>
                            <div class="commodityPrice">10元/个</div>
                            <div class="commentAmount">已有10人评价</div>
                        </div>
                        <div class="commodityInfo">
                            <div class="cityLabel">北京</div>
                            <img src="assets/innerRes/img/test3.jpg"/>
                            <div class="commodityName">水果拼盘</div>
                            <div class="commodityPrice">10元/个</div>
                            <div class="commentAmount">已有10人评价</div>
                        </div>
                    </div>
                    <div class="customRow">
                        <div class="commodityInfo">
                            <div class="cityLabel">北京</div>
                            <img src="assets/innerRes/img/test4.jpg"/>
                            <div class="commodityName">水果拼盘</div>
                            <div class="commodityPrice">10元/个</div>
                            <div class="commentAmount">已有10人评价</div>
                        </div>
                        <div class="commodityInfo">
                            <div class="cityLabel">北京</div>
                            <img src="assets/innerRes/img/test5.jpg"/>
                            <div class="commodityName">水果拼盘</div>
                            <div class="commodityPrice">10元/个</div>
                            <div class="commentAmount">已有10人评价</div>
                        </div>
                        <div class="commodityInfo">
                            <div class="cityLabel">北京</div>
                            <img src="assets/innerRes/img/test6.jpg"/>
                            <div class="commodityName">水果拼盘</div>
                            <div class="commodityPrice">10元/个</div>
                            <div class="commentAmount">已有10人评价</div>
                        </div>
                    </div>

                    <div class="customRow">
                        <div class="commodityInfo">
                            <div class="cityLabel">北京</div>
                            <img src="assets/innerRes/img/test7.jpg"/>
                            <div class="commodityName">水果拼盘</div>
                            <div class="commodityPrice">10元/个</div>
                            <div class="commentAmount">已有10人评价</div>
                        </div>
                        <div class="commodityInfo">
                            <div class="cityLabel">北京</div>
                            <img src="assets/innerRes/img/test8.jpg"/>
                            <div class="commodityName">水果拼盘</div>
                            <div class="commodityPrice">10元/个</div>
                            <div class="commentAmount">已有10人评价</div>
                        </div>
                    </div>-->
                </div>
            </div>
        </aside>

        <aside class="operationHistoryContainer">
            <div class="operationHistoryTitle"></div>
            <div class="operationHistoryList"></div>
        </aside>
    </div>
</div>

<input id="basePath" type="hidden" value="<%=basePath%>"/>
<script src="assets/outerRes/js/jquery-3.0.0.js"></script>
<script src="assets/outerRes/js/bootstrap.js"></script>
<script src="assets/innerRes/js/index.js"></script>
<script src="assets/innerRes/js/header.js"></script>
<script>
    index.init();
    header.init();
</script>
</body>
</html>
